package com.gavin.demo4fresco.utils;

import com.gavin.demo4fresco.config.GlobalVars;
import com.gavin.demo4fresco.model.entities.PictureObj;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Gavin on 16/2/15.
 */
public class InitUtil {

    public static List<PictureObj> initPictureObj() {
        List<PictureObj> mDatas = new ArrayList<>();
        for (String url : GlobalVars.URLS) {
            PictureObj obj = new PictureObj();
            obj.setUrl(url);
            obj.setDesc(url);
            mDatas.add(obj);
        }
        return mDatas;
    }

    public static List<PictureObj> initScalePictureObj() {
        List<PictureObj> mDatas = new ArrayList<>();
        for (String scale : GlobalVars.SCALES) {
            PictureObj obj = new PictureObj();
            obj.setUrl(GlobalVars.URLS[0]);
            obj.setDesc(scale);
            mDatas.add(obj);
        }
        return mDatas;
    }
}
